@model Contoso_University.Models.Instructor

@{
    ViewData["Title"] = "新建讲师";
}

<h1>新建讲师</h1>

<h4>讲师信息</h4>
<hr />
<div class="row">
    <div class="col-md-6">
        <form asp-action="Create">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group mb-3">
                <label asp-for="LastName" class="control-label">姓</label>
                <input asp-for="LastName" class="form-control" />
                <span asp-validation-for="LastName" class="text-danger"></span>
            </div>
            <div class="form-group mb-3">
                <label asp-for="FirstName" class="control-label">名</label>
                <input asp-for="FirstName" class="form-control" />
                <span asp-validation-for="FirstName" class="text-danger"></span>
            </div>
            <div class="form-group mb-3">
                <label asp-for="HireDate" class="control-label">聘用日期</label>
                <input asp-for="HireDate" class="form-control" type="date" />
                <span asp-validation-for="HireDate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <input type="submit" value="创建" class="btn btn-primary" />
                <a asp-action="Index" class="btn btn-secondary">返回列表</a>
            </div>
        </form>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
} 